﻿<%@ Page Language="C#" MasterPageFile="~/Manage/MainPage.master"  AutoEventWireup="true" CodeFile="NewsCategoriesManage.aspx.cs" Inherits="Manage_NewsCategoriesManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/Manage/Js/NewsCategoriesManage.js"></script>
<script type="text/javascript">
  ModelOfCategory = <%=new NewsCategories().ToJsonString() %>;
</script>


<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
  <tr>
    <td colspan="5" align="left" class="HeadTitle">&gt;&gt;资讯类别管理</td>
  </tr>
  <tr class="TableHeadRow">
    <td width="60" align="center">序号</td>
    <td align="left">类别名称 </td>
    <td width="100" align="center">状态</td>
    <td width="150" align="center">创建日期</td>
    <td width="150" align="center">管理[<a onclick="Add();" href="javascript:void(0);" class="red">+添加类别</a>]</td>
  </tr>

    <%
        if (listOfCategories != null)
        {
            for (int i = 0; i < listOfCategories.Count; ++i)
            {
                NewsCategories c = listOfCategories[i];
     %>
  <tr  onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';" bgcolor="#FFFFFF" >
    <td align="center"><%=i+1 %>.</td>
    <td align="left">
    <a href="javascript:void(0);" onclick="Edit(<%=c.CategoryID %>);"  >
    <%=c.CategoryName %></a>
     </td>
    <td align="center"><%=c.Status %></td>
    <td align="center"><%=c.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center">[<a href="javascript:void(0);" onclick="Edit(<%=c.CategoryID %>);">编辑</a>] 
    [<a href="javascript:void(0);" onclick="Delete(<%=c.CategoryID %>);">删除</a>] </td>
  </tr>
   <% }
        }
        else
        { %>
  
  <tr>
    <td colspan="5" align="center">[ <span class="red bold">系统未找到任何分类信息!</span> ]</td>
    </tr>
    <%} %>
</table>

</asp:Content>
